package com.yyge.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p> 登录鉴权演示 </p>
 *
 * @author : gityyge
 * @description :
 * @date : 2019/8/19 13:49
 */
@RestController
@RequestMapping("")
@Api(tags = "登录注册")
public class DemoController  {

    /**
     * 模拟登录接口 - 该接口用于swagger查看调用
     * 实际上请求进来后 不会来这个方法处理 会被SpringSecurity拦截转发到
     * @return
     */
    @PostMapping(value = "/login", produces = "application/json;charset=utf-8")
    @ApiOperation(value = "登录接口", httpMethod = "POST")
    public Object login() {
        return "登录成功";
    }

}
